<template>
    <el-submenu v-if="item.children.length > 0" :index="item.path">
        <el-sub-menu index="1">
            <template #title>
                <span> {{ item.Label }} </span>
            </template>
            <!-- <el-menu-item index="1-1">item one</el-menu-item> -->
            <NestedMenuItem v-for="(child, i) in item.children" :key="i" :item="child" />
        </el-sub-menu>
    </el-submenu>
    <el-menu-item v-else :index="item.path" @click="$router.push(item.path)">
        {{ item.label }}
    </el-menu-item>
</template>

<script>
export default {
    name: 'NestedMenuItem',
    props: ['item'],

    mounted() {
    }
}
</script>